package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PcPurchaseReceipt generated by hbm2java
 */
@Entity
@Table(name="pc_purchase_receipt"
    ,catalog="ncsc_erp"
)
public class PcPurchaseReceipt  implements java.io.Serializable {


     private long rcptNo;
     private HrEmp hrEmpByRcptReceiptByEmpNo;
     private PcPurchaseReceiptStatus pcPurchaseReceiptStatus;
     private PcPurchaseOrder pcPurchaseOrder;
     private HrEmp hrEmpByRcptCreatedByEmpNo;
     private String rcptCode;
     private String rcptDescr;
     private Date rcptDate;
     private String rcptRefDelCode;
     private String rcptDelByName;
     private Date rcptReceiptDtm;
     private Date rcptCreatedDtm;
     private String rcptMemo;
     private Short rcptStatusIncVat;
     private BigDecimal rcptVatPercVal;
     private BigDecimal rcptVatVal;
     private Set<PcPurchaseReceiptItem> pcPurchaseReceiptItems = new HashSet<PcPurchaseReceiptItem>(0);

    public PcPurchaseReceipt() {
    }

	
    public PcPurchaseReceipt(long rcptNo, String rcptCode, String rcptDescr, Date rcptDate, BigDecimal rcptVatPercVal, BigDecimal rcptVatVal) {
        this.rcptNo = rcptNo;
        this.rcptCode = rcptCode;
        this.rcptDescr = rcptDescr;
        this.rcptDate = rcptDate;
        this.rcptVatPercVal = rcptVatPercVal;
        this.rcptVatVal = rcptVatVal;
    }
    public PcPurchaseReceipt(long rcptNo, HrEmp hrEmpByRcptReceiptByEmpNo, PcPurchaseReceiptStatus pcPurchaseReceiptStatus, PcPurchaseOrder pcPurchaseOrder, HrEmp hrEmpByRcptCreatedByEmpNo, String rcptCode, String rcptDescr, Date rcptDate, String rcptRefDelCode, String rcptDelByName, Date rcptReceiptDtm, Date rcptCreatedDtm, String rcptMemo, Short rcptStatusIncVat, BigDecimal rcptVatPercVal, BigDecimal rcptVatVal, Set<PcPurchaseReceiptItem> pcPurchaseReceiptItems) {
       this.rcptNo = rcptNo;
       this.hrEmpByRcptReceiptByEmpNo = hrEmpByRcptReceiptByEmpNo;
       this.pcPurchaseReceiptStatus = pcPurchaseReceiptStatus;
       this.pcPurchaseOrder = pcPurchaseOrder;
       this.hrEmpByRcptCreatedByEmpNo = hrEmpByRcptCreatedByEmpNo;
       this.rcptCode = rcptCode;
       this.rcptDescr = rcptDescr;
       this.rcptDate = rcptDate;
       this.rcptRefDelCode = rcptRefDelCode;
       this.rcptDelByName = rcptDelByName;
       this.rcptReceiptDtm = rcptReceiptDtm;
       this.rcptCreatedDtm = rcptCreatedDtm;
       this.rcptMemo = rcptMemo;
       this.rcptStatusIncVat = rcptStatusIncVat;
       this.rcptVatPercVal = rcptVatPercVal;
       this.rcptVatVal = rcptVatVal;
       this.pcPurchaseReceiptItems = pcPurchaseReceiptItems;
    }
   
     @Id 

    
    @Column(name="RCPT_NO", unique=true, nullable=false)
    public long getRcptNo() {
        return this.rcptNo;
    }
    
    public void setRcptNo(long rcptNo) {
        this.rcptNo = rcptNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RCPT_RECEIPT_BY_EMP_NO")
    public HrEmp getHrEmpByRcptReceiptByEmpNo() {
        return this.hrEmpByRcptReceiptByEmpNo;
    }
    
    public void setHrEmpByRcptReceiptByEmpNo(HrEmp hrEmpByRcptReceiptByEmpNo) {
        this.hrEmpByRcptReceiptByEmpNo = hrEmpByRcptReceiptByEmpNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RCPT_STATUS_NO")
    public PcPurchaseReceiptStatus getPcPurchaseReceiptStatus() {
        return this.pcPurchaseReceiptStatus;
    }
    
    public void setPcPurchaseReceiptStatus(PcPurchaseReceiptStatus pcPurchaseReceiptStatus) {
        this.pcPurchaseReceiptStatus = pcPurchaseReceiptStatus;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RCPT_REF_PO_NO")
    public PcPurchaseOrder getPcPurchaseOrder() {
        return this.pcPurchaseOrder;
    }
    
    public void setPcPurchaseOrder(PcPurchaseOrder pcPurchaseOrder) {
        this.pcPurchaseOrder = pcPurchaseOrder;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RCPT_CREATED_BY_EMP_NO")
    public HrEmp getHrEmpByRcptCreatedByEmpNo() {
        return this.hrEmpByRcptCreatedByEmpNo;
    }
    
    public void setHrEmpByRcptCreatedByEmpNo(HrEmp hrEmpByRcptCreatedByEmpNo) {
        this.hrEmpByRcptCreatedByEmpNo = hrEmpByRcptCreatedByEmpNo;
    }

    
    @Column(name="RCPT_CODE", nullable=false, length=50)
    public String getRcptCode() {
        return this.rcptCode;
    }
    
    public void setRcptCode(String rcptCode) {
        this.rcptCode = rcptCode;
    }

    
    @Column(name="RCPT_DESCR", nullable=false, length=300)
    public String getRcptDescr() {
        return this.rcptDescr;
    }
    
    public void setRcptDescr(String rcptDescr) {
        this.rcptDescr = rcptDescr;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="RCPT_DATE", nullable=false, length=10)
    public Date getRcptDate() {
        return this.rcptDate;
    }
    
    public void setRcptDate(Date rcptDate) {
        this.rcptDate = rcptDate;
    }

    
    @Column(name="RCPT_REF_DEL_CODE", length=50)
    public String getRcptRefDelCode() {
        return this.rcptRefDelCode;
    }
    
    public void setRcptRefDelCode(String rcptRefDelCode) {
        this.rcptRefDelCode = rcptRefDelCode;
    }

    
    @Column(name="RCPT_DEL_BY_NAME", length=200)
    public String getRcptDelByName() {
        return this.rcptDelByName;
    }
    
    public void setRcptDelByName(String rcptDelByName) {
        this.rcptDelByName = rcptDelByName;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="RCPT_RECEIPT_DTM", length=19)
    public Date getRcptReceiptDtm() {
        return this.rcptReceiptDtm;
    }
    
    public void setRcptReceiptDtm(Date rcptReceiptDtm) {
        this.rcptReceiptDtm = rcptReceiptDtm;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="RCPT_CREATED_DTM", length=19)
    public Date getRcptCreatedDtm() {
        return this.rcptCreatedDtm;
    }
    
    public void setRcptCreatedDtm(Date rcptCreatedDtm) {
        this.rcptCreatedDtm = rcptCreatedDtm;
    }

    
    @Column(name="RCPT_MEMO", length=500)
    public String getRcptMemo() {
        return this.rcptMemo;
    }
    
    public void setRcptMemo(String rcptMemo) {
        this.rcptMemo = rcptMemo;
    }

    
    @Column(name="RCPT_STATUS_INC_VAT")
    public Short getRcptStatusIncVat() {
        return this.rcptStatusIncVat;
    }
    
    public void setRcptStatusIncVat(Short rcptStatusIncVat) {
        this.rcptStatusIncVat = rcptStatusIncVat;
    }

    
    @Column(name="RCPT_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getRcptVatPercVal() {
        return this.rcptVatPercVal;
    }
    
    public void setRcptVatPercVal(BigDecimal rcptVatPercVal) {
        this.rcptVatPercVal = rcptVatPercVal;
    }

    
    @Column(name="RCPT_VAT_VAL", nullable=false, precision=15)
    public BigDecimal getRcptVatVal() {
        return this.rcptVatVal;
    }
    
    public void setRcptVatVal(BigDecimal rcptVatVal) {
        this.rcptVatVal = rcptVatVal;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="pcPurchaseReceipt")
    public Set<PcPurchaseReceiptItem> getPcPurchaseReceiptItems() {
        return this.pcPurchaseReceiptItems;
    }
    
    public void setPcPurchaseReceiptItems(Set<PcPurchaseReceiptItem> pcPurchaseReceiptItems) {
        this.pcPurchaseReceiptItems = pcPurchaseReceiptItems;
    }




}


